#include <boost/function.hpp>

int one()
{
    return 1;
}

int two()
{
    return 2;
}

boost::function0< int > pick(int which)
{
    if(which)
        return one;
    else
        return two;
}

struct some_error : public std::runtime_error
{
    some_error() : 
        std::runtime_error("some_error")
    {}
};

void call_me_back( boost::function1< void, int > fn, int param)
{
    try
    {
        fn(param);
    }
    catch( some_error & err)
    {
        // ignored
    }
}

struct a_class {};

int just_call_me( boost::function1< int, a_class * > fn)
{
    a_class err;
    return fn(&err);
}
   

void badly_named()
{}
